//导入一些系统设置
import { appPort } from "./config/setting.js";
import {routes} from "./router/gidsooo.js";
import { regTemplating } from "./render/index.js";
//引入Koa
import Koa from 'koa'
import bodyParser from "koa-bodyparser";
import { sync,User } from "./model/User.js";

let user = await User.findAll();
//实例化koa
let app = new Koa();

app.use(regTemplating())

app.use(bodyParser())

app.use(routes())

//监听某个端口
app.listen(appPort)
//为了体验更好，打印服务运行的地址
console.log(`服务运行于:http://localhost:${appPort}`);